<?php

namespace app\model\not_del;

use think\Model;
use think\model\relation\HasMany;

/**
 * 单位
 */
class UnitModel extends Model
{
    protected $name = 'unit';

    /**
     * 关联banner图
     * @return HasMany
     */
    public function UnitBanner(): HasMany
    {
        return $this->hasMany(UnitBannerModel::class, 'unit_id');
    }

    public function user(): HasMany
    {
        return $this->hasMany(UserModel::class, 'unit_id');
    }
}